﻿using SAP.Middleware.Connector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SDF.Plugin.Misc.SAPAdapter.Models
{
    public class FunctionParamsModel
    {
        public string ParamName { get; set; }

        public string ParamDesc { get; set; }

        public string ParamType { get; set; }

        public int ParamLength { get; set; }

        /// <summary>
        /// 小数位数
        /// </summary>
        public int ParamDecimals { get; set; }

        public string Direction { get; set; }

        /// <summary>
        /// 是否是简单类型
        /// </summary>
        public bool IsNormalType
        {
            get
            {
                return (
                    ParamType.Equals(RfcDataType.TABLE.ToString()) ||
                    ParamType.Equals(RfcDataType.STRUCTURE.ToString())
                ) == false;
            }
        }

        public string DefaultValue { get; set; }

        public IList<FunctionParamsModel> ChildParams { get; set; }
    }
}